<?php
/**
 * Joomla! 1.5 component sialpacadb
 *
 * @version $Id: sialpacadb.php 2010-11-15 11:24:35 svn $
 * @author ErreCi
 * @package Joomla
 * @subpackage sialpacadb
 * @license Copyright (c) 2010 - All Rights Reserved
 *
 * Gestione archivio per allevamenti di Alpaca
 *
 * This component file was created using the Joomla Component Creator by Not Web Design
 * http://www.notwebdesign.com/joomla_component_creator/
 *
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

/*
 * Define constants for all pages
 */
define( 'COM_SIALPACADB_DIR', 'images'.DS.'sialpacadb'.DS );
define( 'COM_SIALPACADB_BASE', JPATH_ROOT.DS.COM_SIALPACADB_DIR );
define( 'COM_SIALPACADB_BASEURL', JURI::root().str_replace( DS, '/', COM_SIALPACADB_DIR ));

$doc = &JFactory::getDocument();
$doc->addStyleSheet(JURI::base().'components/com_sialpacadb/assets/sialpaca.css');

// Require the base controller
require_once JPATH_COMPONENT.DS.'controller.php';

// Require the base controller
require_once JPATH_COMPONENT.DS.'helpers'.DS.'helper.php';

// titolo
JToolBarHelper::title('SIALPACA '. JText::_('SIA_COMTITLE'), 'sialpacadb');
//JToolBarHelper::title(JText::_('sialpacadb'), 'generic.png');
//JToolBarHelper::preferences('com_sialpacadb');
$item4 = 'index.php?option=com_sialpacadb&view=admintab';
$item5 = 'index.php?option=com_sialpacadb&view=about';
$item3 = 'index.php?option=com_sialpacadb&view=addpet';
JSubMenuHelper::addEntry(JText::_('SIA_MENU_ADDPET'), $item3, ($view == 'addpet'));
JSubMenuHelper::addEntry(JText::_('SIA_MENU_ADMINTAB'), $item4, ($view == 'admintab'));
JSubMenuHelper::addEntry(JText::_('SIA_MENU_ABOUT'), $item5, ($view == 'about'));
// Initialize the controller
$controller = new SialpacadbController( );

// Perform the Request task
$controller->execute( JRequest::getCmd('task'));
$controller->redirect();
?>
